<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><#if op??><#if op="view">查看<#elseif op="edit">修改</#if><#else>新增</#if>商品品牌</title>
	<link href="/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="place">
    	<span>位置：</span>
	    <ul class="placeul"><li><a href="/index.html">首页</a></li><li><#if op??><#if op="view">查看<#elseif op="edit">修改</#if><#else>新增</#if>商品品牌</li></ul>
    </div>
    <br><br>
	<form action="/ware/brand/save.html" method="post">
		<input name="id" type="hidden" value="${(brand.id)!""}">
	    <ul class="forminfo">
		    <li>
		    	<label>品牌名称：</label>
		    	<input name="name" type="text" class="scinput input-lg" value="${(brand.name)!""}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" 
		    		data-easyform="length:2 20;char-chinese;real-time;" data-message="名称为2~20位的中英文、数字、下划线或中文符号" />
		    	<i><font class="font-red">*</font></i>
		    </li>
		    <li>
		    	<label> 显示顺序：</label>
		    	<input name="displayOrder" type="text" class="scinput input-lg" value="${(brand.displayOrder)!""}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" 
		    		data-easyform="null;uint:1 99999;real-time;" data-message="显示顺序取值范围为1~99999" />
		    	<i><font class="font-red">*</font>倒序显示。1为显示在最后。此顺序相同的则以更新时间倒序显示</i>
		    </li>
		    <li>
		    	<label>状态：</label>
		    	<input name="status" type="radio" value="1" selected="selected" autocomplete="off" data-message="请选择状态">开启&ensp;<input name="status" type="radio" value="2" autocomplete="off">关闭
		    	<i><font class="font-red">*</font>选择关闭后，此分类在前端分类展示页面不可见。但是数据还是可以被搜索和查看</i>
		    </li>
		    <li>
		    	<label>LOGO：</label>
		    	<div class="img_show_outer img_show_wapper img_upload" id="uploadBtnOuter">
		    		<img src="/images/loading_1.gif" id="loadingImg" style="display: none; width: 32px; min-height: 32px; margin-top: 20px;">
		    		<span class="img_show_cover" id="uploadingBtn" style="display: none;">正在上传...</span>
		    		<img src="${(brand.logo)!"/images/icon_add.png"}" id="addImg">
		    		<span class="img_show_cover" id="uploadBtn">上传</span>
		    	</div>
		    	<input name="file" id="file" type="file" class="scinput input-lg" style="display:none;"/>
		    	<input name="logo" type="hidden" value="${(brand.logo)!""}"/>
		    </li>
		    <li>
		    	<label>摘要：</label>
		    	<input name="summary" type="text" class="scinput input-lg" value="${(brand.summary)!""}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" 
		    		data-easyform="null;" />
		    	<i>品牌摘要，可以是品牌广告语等</i>
		    </li>
		    <li>
		    	<label>备注：</label>
		    	<input name="description" type="text" class="scinput input-lg" value="${(brand.description)!""}" <#if op?? && op="view">disabled=true</#if> autocomplete="off" 
		    		data-easyform="null;" />
		    </li>
		    <li>
		    	<label>&nbsp;</label>
		    	<#if !op?? || op!="view">
		    	<input id="submitBtn" type="submit" class="btn" value="提交"/>&emsp;
		    	</#if>
		    	<input id="cancelBtn" type="button" class="btn" value="返回"/>
		    </li>
	    </ul>
	</form>
</body>
<script type="text/javascript" src="/js/jquery-1.10.1.min.js"></script>
<link href="/js/ext/easyform/easyform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/ext/easyform/easyform.js"></script>
<script type="text/javascript" src="/js/ext/ajaxfileupload.js"></script>
<script type="text/javascript" src="/js/commonAdd.js"></script>
<script>
//  imgDir	上传文件目录编号，各自上传页面设定：1、广告；2、产品；3、帮助；4、分类推荐；9、其他
var imgDir = 4;
/**
 * 处理上传完成后的事情，上传方法在commonAdd.js
 * @param imgUrl
 */
function handleAfterUpload(imgUrl) {
	$("input[name='logo']").val(imgUrl);
	$("#addImg").attr("src", imgUrl);
}
</script>
</html>